import request from '@/utils/request'
// 列表
export function getSettlementList(query) {
  return request({
    url: '/car/CarSettlement/list',
    method: 'get',
    params: query
  })
}

// 列表删除
export function delSettlementList(id) {
  return request({
    url: `/car/CarSettlement/${id}`,
    method: 'delete',
  })
}

// 添加
export function getAddSettlementList(data) {
  return request({
    url: '/car/CarSettlement',
    method: 'post',
    data
  })
}

// 详情
export function getSettlementDetails(id) {
  return request({
    url: `/car/CarSettlement/${id}`,
    method: 'get',
  })
}

//新增详情
export function getAddSettlementDetails(carNo) {
  return request({
    url: `/car/carBasic/findCarBasicByCarNo/${carNo}`,
    method: 'get',
  })
}

///新增提交
export function submitAddSettlements(data) {
  return request({
    url: `/car/CarSettlement/getFeedback`,
    method: 'post',
    data
  })
}

//(理赔)根据出险日期查出交强险保单号和商业险保单号
export function getInsuranceTime(params) {
  return request({
    url: `/car/insurance/getCodeBySettlementDate`,
    method: 'get',
    params:params
  })
}
